from ultralytics import YOLO

if __name__ == '__main__':
    model = YOLO(r'ultralytics/cfg/models/11/yolo11-seg.yaml')
    # model = YOLO(r'yolo11n-seg.pt')
    model.train(data=r'D:\songlin\Python\PythonTraining3\ultralytics\ultralytics\cfg\datasets\digit_caliper.yaml',
                imgsz=640,
                epochs=300,
                single_cls=True,
                batch=32,
                workers=10,
                device='0',
                )